{% load i18n admin_urls suit_tags %}
<div class="submit-row clearfix">
  {% if show_save %}<button type="submit" class="btn btn-high btn-info" name="_save">{% trans 'Save' %}</button>{% endif %}
  {% if show_save_and_continue %}<button type="submit" name="_continue" class=" btn btn-high">{% trans 'Save and continue editing' %}</button>{% endif %}
  {% if show_save_as_new %}<button type="submit" name="_saveasnew" class="btn">{% trans 'Save as new' %}</button>{%endif%}
  {% if show_save_and_add_another %}<button type="submit" name="_addanother" class="btn">{% trans 'Save and add another' %}</button>{% endif %}

  {% if show_delete_link %}
    {% if '1.9'|django_version_lt %}
      <a href="delete/" class="text-error deletelink">{% trans "Delete" %}</a>
    {% else %}
      <a href="{% url opts|admin_urlname:'delete' original.pk|admin_urlquote %}" class="text-error deletelink">{% trans "Delete" %}</a>
    {% endif %}
  {% endif %}
  {% if show_delete_translation %}
    {% if show_delete_link %}
    <br>
    {% endif %}
    {% if '1.9'|django_version_lt %}
      <a href="delete-translation/?language={{ language }}" class="text-error deletelink delete-translation">{% blocktrans with language_name|lower as language %}Delete {{ language }} translation{% endblocktrans %}</a>
    {% else %}
      <a href="{% url opts|admin_urlname:'delete' original.pk|admin_urlquote %}-translation/?language={{ language }}" class="text-error deletelink delete-translation">{% blocktrans with language_name|lower as language %}Delete {{ language }} translation{% endblocktrans %}</a>
    {% endif %}
  {% endif %}

</div>

<script type="text/javascript">
(function ($) {
	var i = 0;
	$('form').submit(function () {
		i++; if(i > 1) { return false; }
	});
})(jQuery);
</script>
